#include<stdio.h>
#include<stdlib.h>

typedef int ElemType;
typedef struct DNode{
	ElemType data;
	struct DNode *prior ,*next;
}DNode,*DLinklist; 


bool InitDLinkList(DLinklist &L){
	L =(DNode *)malloc(sizeof(DNode));
	if(L==NULL)
		return false;
	L->prior =L;
	L->next =L;
	return true;
} 

bool Empty(DLinkList L){
	return L->next==L;
}

bool isTail(DLinklist L,DNode *p){
	return p->next==L;
}
